﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Betfairer
{
    public class Market
    {
        public int MarketId { get; set; }
        public String MarketName { get; set; }
        public String MarketType { get; set; }
        public String MarketStatus { get; set; }
        public DateTime EventDate { get; set; }
        public long EventDateMs { get; set; }
        public String MenuPath { get; set; }
        public String EventHeirachy { get; set; }
        public int BetDelay { get; set; }
        public int ExchangeId { get; set; }
        public String CountryCode { get; set; }
        public DateTime LastRefresh { get; set; }
        public int NoOfRunners { get; set; }
        public int NoOfWinners { get; set; }
        public double TotalAmountMatched { get; set; }
        public bool BspMarket { get; set; }
        public bool TurningInPlay { get; set; }
        public decimal InPair { get; set; }
        public Table Table { get; set; }

        public override int GetHashCode()
        {
            return base.GetHashCode();
        }

        public override bool Equals(object obj)
        {
            if (obj is Market)
            {
                return ((Market)obj).MarketId == this.MarketId;
            }

            return false;
        }

        public override string ToString()
        {
            return String.Format("[Id: {0}, Name: {1}, Type: {2}, Status: {3}, Date: {4}, DateMs: {5}, LastRefresh: {6}]", MarketId, MarketName, MarketType, MarketStatus, EventDate, EventDateMs, LastRefresh);
        }
    }
}
